// ============================== 导入依赖 ============================== //

import CORE from '@login/CORE'
import Client from '@api/base/api/DeviceCategoryApi'

import ComClass from '@api/ComQuery'
import SelectClass from '@api/base/model/QueryDeviceCategoryListReq'
import BaseClass from '@api/base/model/DeviceCategoryDto'

const CLIENT = CORE.grpcCLIENT(Client)
const COM = [ComClass, 'comQuery']
const BASE = [BaseClass, 'content']

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 下拉框 —————————————————————————————— //

  async getSelect(selectParam, TIP = '查询下拉框') {
    const DTO = CORE.grpcDTO(SelectClass, selectParam, COM, BASE)
    const resp = await CORE.grpc(TIP, CLIENT, 'queryDeviceCategoryList', DTO)
    return resp.content || []
  },
}
